function main() {
    debugger
    const self = this;
    let pageRenderElement = this.$$root().$parent.$parent.$parent;

    let formPartEle = self.$$element("form_part_80r0ke");
    let formEle = formPartEle.$$getRenderElement();
    let formValue = formEle.$$getFormValue()['ds_tbl:t_355f38575f894287a8e40d8af41ae10c'];
    let id = formValue.id;
    let unitName = formValue.text_input_6pb5tu; // 机构名称
    let unitNameAbbr = formValue.text_input_b2uvyd; // 机构简称
    let seniorId = formValue.tree_single_select_13q1ge; // 所属机构
    let unitPropertyCode = formValue.single_select_gl6qfp;  // 部门属性
    let regionId = formValue.tree_single_select_1sohfs; // 行政区划
    let usercenterUnitId = formValue.single_select_gl6qfp;  // 关联用户体系部门
    let syncUsercenterFlag = formValue.radio_61g5vf;    // 是否同步用户体系
    let unitTypeCode = formValue.checkbox_715py5;   // 机构类别
    let socialCreditCode = formValue.text_input_5uxl5t; // 统一社会信用代码
    let unitLayerLevelCode = formValue.single_select_aitj6e;    //  部门层级
    let legalDelegateMan = formValue.text_input_go3c3p; // 法定代表人
    let foundDate = formValue.date_picker_51oe0i;   // 成立日期
    let postalCode = formValue.text_input_agf1ki;   // 邮政编码
    let email = formValue.text_input_4mdxvk;    // 邮箱
    let fax = formValue.text_input_2an17t;  // 传真
    let phone = formValue.text_input_bqewyt;    // 联系电话
    let address = formValue.text_input_aol9mx;  // 部门地址
    let unitIndustryTypeCode = formValue.single_select_197css;  // 所属领域
    let verticalManageStateCode = formValue.single_select_9l2zcc;   // 垂管情况
    let verticalManageLevelCode = formValue.single_select_9fx606;   // 垂管层级
    let verticalManageUnit = formValue.tree_single_select_85775k;   // 垂管部门
    let unitStaffSize = formValue.number_input_86qfhb;  //  编制人员
    let settingBasis = formValue.textarea_dzpnbg;   // 设定依据

    // law_std_unit_base_info
    const unitBaseInfo ={
        "id": id,
        "unitName": unitName,
        "unitNameAbbr": unitNameAbbr,
        "seniorId": seniorId,
        "unitPropertyCode": unitPropertyCode,
        "regionId": regionId,
        "usercenterUnitId": usercenterUnitId,
        "syncUsercenterFlag": syncUsercenterFlag,
        "unitTypeCode": unitTypeCode,
        "socialCreditCode": socialCreditCode,
        "unitLayerLevelCode": unitLayerLevelCode,
        "legalDelegateMan": legalDelegateMan,
        "foundDate": foundDate,
        "postalCode": postalCode,
        "email": email,
        "fax": fax,
        "phone": phone,
        "address": address,
        "unitIndustryTypeCode": unitIndustryTypeCode,
        "verticalManageStateCode": verticalManageStateCode,
        "verticalManageLevelCode": verticalManageLevelCode,
        "verticalManageUnit": verticalManageUnit,
        "unitStaffSize": unitStaffSize,
        "settingBasis": settingBasis
    }

    // 监督机关
    let organUnitPropertyCode = formValue.single_select_6h4dtp;  // 监督机关类型

    // 监督机构
    let institutionUnitPropertyCode = formValue.single_select_775354;  // 监督机关类型
    let superviseUnitId = formValue.tree_single_select_eyvn62;  // 所属监督机关

    // law_std_supervise_unit_info
    // 监督机关
    const organSuperviseUnitInfo = {
        "id": id,
        "unitPropertyCode": organUnitPropertyCode,
        "superviseUnitId": superviseUnitId
    }

    // 监督机构
    const institutionSuperviseUnitInfo = {
        "id": id,
        "unitPropertyCode": institutionUnitPropertyCode,
        "superviseUnitId": superviseUnitId
    }

    // 执法部门信息
    let  lawUnitPropertyCode = formValue.single_select_gl6qfp; // 部门性质

    // 执法主体信息
    let subjectCategoryCode = formValue.single_select_4xhdme;   // 主体类别
    let subjectId = formValue.tree_single_select_a7pozd;   // 所属执法主体

    // 执法机构信息
    let  lawSubjectId = formValue.tree_single_select_a7pozd;   // 所属执法主体

    // law_std_subject_unit_info
    const lawUnitInfo = {
        "id": id,
        "unitPropertyCode": lawUnitPropertyCode,
    }

    const subjectUnitInfo = {
        "id": id,
        "subjectCategoryCode": subjectCategoryCode,
        "lawSubjectId": subjectId
    }

    const organUnitInfo = {
        "id": id,
        "lawSubjectId": lawSubjectId,
    }

    let detailValue = formEle.$$getFormValue()['detail_table_hl9v69'] || [];

    // 委托组织
    const delegationUnitInfoList = detailValue
        .filter(item => item && item.single_select_hoilag)  // 过滤掉无效行
        .map(item => ({
            stdSubjectId: item.single_select_hoilag,
            delegateModeType: item.single_select_f31blu,
            delegateSettingBasis: item.text_input_mu7fk,
            delegateStartDate: item.date_picker_51n8ah,
            delegateEndDate: item.date_picker_9qltsk,
            delegatePublicFlag: item.single_select_d7hy0z
        }));




    if (formPartEle) {
        formEle.$$validateData().then((res) => {
            if (!res.success) {
                var target = formEle.state.validate.target;
                return;
            } else {
                saveForm(self);
            }
        });
    }
}

function saveForm(self){

}
